package com.primestone.cim.service;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

import ch.iec.tc57._2011.getmeterreadingsmessage.GetMeterReadingsRequestType;
import ch.iec.tc57._2011.schema.message.HeaderType;

import com.primestone.cim.meterreadings.beans.MaxMinDate;
import com.primestone.cim.meterreadings.beans.ResMeterReadingsContainer;
import com.primestone.cim.util.enums.SocDevEnum;
import com.primestone.cim.util.exceptions.ServiceException;

/**
 * 
 * @author cesar.mateus
 *
 */
public interface IGetMeterReadingsService extends Serializable {

	/**
	 * 
	 * @param request
	 * @param top
	 * @param ticket
	 * @param header
	 * @param offset
	 * @param onlyNew
	 * @param idSocketOrDevice
	 * @param socketOrDevice
	 * @param allFromDates 
	 * @param se 
	 * @return
	 * @throws ServiceException
	 */
	ResMeterReadingsContainer getReadings(
			GetMeterReadingsRequestType request, int top, String ticket, HeaderType header, int offset, 
			boolean onlyNew, String idSocketOrDevice, SocDevEnum socketOrDevice, Map<String, Date> allFromDates, ServiceException se);
	
	/**
	 * 
	 * @param user
	 * @param pwd
	 * @return
	 */
	String isValidUser(String user, String pwd);

	/**
	 * 
	 * @param noins
	 * @return
	 */
	String isValidDevice(String noins);
	
	/**
	 * 
	 * @param idSocket
	 * @return
	 */
	String isValidSocket(String idSocket);
	
	/**
	 * 
	 * @param maxMinDates
	 * @param ticket 
	 * @throws ServiceException
	 */
	void saveExportRegister(List<MaxMinDate> maxMinDates, String ticket, Long idBlock) throws ServiceException;
	
	/**
	 * 
	 * @param idSocketOrDevice
	 * @param varType
	 * @param startDateParam
	 * @return
	 * @throws ServiceException
	 */
	Map<String, Date> getAllFromDates(String idSocketOrDevice, String varType, Date startDateParam) throws ServiceException;

}